import 'package:flutter/material.dart';

class AppTo {
  static void goto(BuildContext context, Widget? page) {
    Navigator.push(
      context,
      MaterialPageRoute(
        builder: (BuildContext context) {
          return page ?? const SizedBox.shrink();
        },
      ),
    );
  }

  static void jump(BuildContext context, Widget? page) {
    Navigator.pushReplacement(
      context,
      MaterialPageRoute(
        builder: (BuildContext context) {
          return page ?? const SizedBox.shrink();
        },
      ),
    );
  }
}
